<div class="row widget owl-carousel-widget">
  <div class="col-xs-12">
    <div id="owlcarousel-carousel" class="owl-carousel owl-theme">
      <?php foreach ($banners as $banner) { ?>
      <div class="item">
        <?php if ($banner['link']) { ?>
        <a href="<?php echo $banner['link']; ?>"><img src="<?php echo $banner['image']; ?>" alt="<?php echo $banner['title']; ?>" class="img-responsive" /></a>
        <?php } else { ?>
        <img src="<?php echo $banner['image']; ?>" alt="<?php echo $banner['title']; ?>" class="img-responsive" />
        <?php } ?>
      </div>
      <?php } ?>
    </div>
    <script type="text/javascript"><!--
    $('#owlcarousel-carousel').owlCarousel({
      items: 1,
      loop: true,
      autoplay: true,
      nav: false,
      dots: true,
    });
    --></script>
  </div>
</div>
